package cn.itcast.test;

import cn.itcast.service.UserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;

/**
 * @author: cuisensen
 * data: 2018/6/18.
 * time: 17:21.
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationContext.xml")
public class Demo01 {
    @Resource(name="userService")
    private UserService us;
    @Test
    public void test1(){
        us.transfer(1,2,100d);
    }
    public void setUs(UserService us) {
        this.us = us;
    }
}
